package com.bwhx.eruler.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.bwhx.eruler.bean.Baofei;
import com.bwhx.eruler.bean.Page;
import com.bwhx.eruler.bean.Ruler;
import com.bwhx.eruler.dao.BaofeiDAO;
import com.bwhx.eruler.dao.RulerDao;
import com.bwhx.eruler.service.BaofeiService;

@Service
public class BaofeiServiceImpl implements BaofeiService {
	
	@Autowired
	BaofeiDAO baofeiDAO;
	
	@Autowired
	RulerDao rulerDAO;

	@Override
	public void insert(Baofei baofei) {
		baofeiDAO.insert(baofei);
	}

	@Override
	public List<Baofei> list(Page p) {
		return baofeiDAO.list(p);
	}

	@Override
	public Integer count(Baofei baofei) {
		return baofeiDAO.count(baofei);
	}

	@Override
	public void del(String bfid) {
		 baofeiDAO.del(bfid);
		
	}

	@Override
	public Baofei get(String bfid) {
		
		return  baofeiDAO.get(bfid);
	}

	@Override
	public void update(Baofei baofei, List<Ruler> paramRulersList) {
		rulerDAO.baofei(paramRulersList);
		baofeiDAO.update(baofei);
	}

	

}
